package org.anti996.lms.mapper;

import org.anti996.lms.model.Booking;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.anti996.lms.model.BookingOutput;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 货单 Mapper 接口
 * </p>
 *
 * @author The Anti996 Authors
 * @since 2022-07-15
 */
@Mapper
public interface BookingMapper extends BaseMapper<Booking> {
    /**
     * @return 返回所有货单数据，不包含计算的BookingStatus项（计算在service中实现）
     */
    List<BookingOutput> findAllBookings();

    List<BookingOutput> findAllBookingsByOperator(String username);

    List<BookingOutput> findAllBookingsByWarehouse(String username);


    BookingOutput findBookingById(int b_num);
}
